const express = require('express');
const router = express.Router();
// middleware that is specific to this router
// 可以设置拦截器，进行权限判断
router.use(function timeLog(req, res, next) {
    console.log(`Time:${Date.now()}`)
    next()
});
router.post('/uploadImg', function (req, res) {
    console.log('uploadImg');
    // 模拟上传成功，直接调用
    res.send({
        url: 'http://10.1.70.62:8000/images/img.png'
    })
});
router.post('/uploadImgTinymce', function (req, res) {
    console.log('uploadImg');
    // 模拟上传成功，直接调用
    res.send({
        location: 'http://10.1.70.62:8000/images/img.png'
    })
});

module.exports = router